package com.le.tester.leetcode;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * createTime：2022/6/21 16:12
 * description：
 */
public class FindRelativeRanks {
    public String[] findRelativeRanks(int[] score) {

        ReentrantLock reentrantLock = new ReentrantLock(false);
        reentrantLock.tryLock();
        //把数组转换成map
        int length = score.length;
        Map<Integer, Object> map = new HashMap<>();
        String[] result = new String[]{};
        for (int i = 0; i < length; i++) {
            map.put(score[i], i);
        }

        System.out.println(map.toString());
        return null;
    }

    public static void main(String[] args) {
//        int[] ints = {5, 4, 3, 2, 1};
//        new FindRelativeRanks().findRelativeRanks(ints);
//        UUID uuid = UUID.randomUUID();
//        String s = uuid.toString().replaceAll("-", "");
//        String substring = s.substring(16);
//        System.out.println(substring);
        long temp = 2 / 5;
        System.out.println(temp);
    }
}
